/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * XMLEditorWindow.java
 *
 * Created on 04 2, 11, 2:06:50 PM
 */

package org.dlsu.pdfgen.gui;

/**
 *
 * @author Marwin Terence Lao -- OPENSRC 3rd Term AY 2010-2011
 */
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import org.dlsu.pdfgen.struct.Syllabus;
public class XMLEditorWindow extends javax.swing.JFrame {

    private Syllabus output;
    private boolean changed;

    /** Creates new form XMLEditorWindow */
    public XMLEditorWindow() {
        output=new Syllabus();
        changed=false;
        initComponents();
	System.out.println("XML Editor started.");
	setVisible(true);
	setLocationRelativeTo(null);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        reqListTypeSelect = new javax.swing.ButtonGroup();
        matListTypeSelect = new javax.swing.ButtonGroup();
        refListTypeSelect = new javax.swing.ButtonGroup();
        fileSelect = new javax.swing.JFileChooser();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        detailsPanel = new javax.swing.JPanel();
        detailsLabel = new javax.swing.JLabel();
        detailsContentPanel = new javax.swing.JPanel();
        typeLabel = new javax.swing.JLabel();
        prereqLabel = new javax.swing.JLabel();
        codeLabel = new javax.swing.JLabel();
        titleLabel = new javax.swing.JLabel();
        jSeparator3 = new javax.swing.JSeparator();
        facultyLabel = new javax.swing.JLabel();
        termLabel = new javax.swing.JLabel();
        roomLabel = new javax.swing.JLabel();
        codeField = new javax.swing.JTextField();
        titleField = new javax.swing.JTextField();
        prereqField = new javax.swing.JTextField();
        typeField = new javax.swing.JTextField();
        facultyField = new javax.swing.JTextField();
        termField = new javax.swing.JTextField();
        roomField = new javax.swing.JTextField();
        timeLabel = new javax.swing.JLabel();
        timeField = new javax.swing.JTextField();
        descriptionPanel = new javax.swing.JPanel();
        descriptionLabel = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        descriptionField = new javax.swing.JTextArea();
        objectivesPanel = new javax.swing.JPanel();
        objectivesContentPanel = new javax.swing.JPanel();
        setObjectivesPanel = new javax.swing.JPanel();
        addObjField = new javax.swing.JTextField();
        addObjButton = new javax.swing.JButton();
        removeObjButton = new javax.swing.JButton();
        jScrollPane3 = new javax.swing.JScrollPane();
        objectivesList = new javax.swing.JList();
        preambleContentPanel = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        preambleField = new javax.swing.JTextArea();
        topicsPanel = new javax.swing.JPanel();
        setTopicsPanel = new javax.swing.JPanel();
        weekLabel = new javax.swing.JLabel();
        nameLabel = new javax.swing.JLabel();
        hoursLabel = new javax.swing.JLabel();
        nameField = new javax.swing.JTextField();
        weekField = new javax.swing.JTextField();
        hoursField = new javax.swing.JTextField();
        jPanel11 = new javax.swing.JPanel();
        addTopicButton = new javax.swing.JButton();
        removeTopicButton = new javax.swing.JButton();
        jPanel12 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        topicsList = new javax.swing.JTable();
        requirementsPanel = new javax.swing.JPanel();
        jScrollPane8 = new javax.swing.JScrollPane();
        requirementsList = new javax.swing.JList();
        setRequirementsPanel = new javax.swing.JPanel();
        addReqField = new javax.swing.JTextField();
        addReqButton = new javax.swing.JButton();
        removeReqButton = new javax.swing.JButton();
        setReqListTypePanel = new javax.swing.JPanel();
        reqListLabel = new javax.swing.JLabel();
        numReqButton = new javax.swing.JRadioButton();
        bulReqButton = new javax.swing.JRadioButton();
        romReqButton = new javax.swing.JRadioButton();
        plnReqButton = new javax.swing.JRadioButton();
        assessmentPanel = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        assessList = new javax.swing.JTable();
        setAssessPanel = new javax.swing.JPanel();
        itemLabel = new javax.swing.JLabel();
        valueLabel = new javax.swing.JLabel();
        itemField = new javax.swing.JTextField();
        valueField = new javax.swing.JTextField();
        jPanel14 = new javax.swing.JPanel();
        addAssessButton = new javax.swing.JButton();
        removeAssessButton = new javax.swing.JButton();
        jPanel15 = new javax.swing.JPanel();
        materialsPanel = new javax.swing.JPanel();
        jScrollPane7 = new javax.swing.JScrollPane();
        materialsList = new javax.swing.JList();
        setMaterialsPanel = new javax.swing.JPanel();
        addMatField = new javax.swing.JTextField();
        addMatButton = new javax.swing.JButton();
        removeMatButton = new javax.swing.JButton();
        setMatListTypePanel = new javax.swing.JPanel();
        matListLabel = new javax.swing.JLabel();
        numMatButton = new javax.swing.JRadioButton();
        bulMatButton = new javax.swing.JRadioButton();
        romMatButton = new javax.swing.JRadioButton();
        plnMatButton = new javax.swing.JRadioButton();
        referencesPanel = new javax.swing.JPanel();
        jScrollPane6 = new javax.swing.JScrollPane();
        referencesList = new javax.swing.JList();
        setRefPanel = new javax.swing.JPanel();
        addRefField = new javax.swing.JTextField();
        addRefButton = new javax.swing.JButton();
        removeRefButton = new javax.swing.JButton();
        setMatListTypePanel1 = new javax.swing.JPanel();
        matListLabel1 = new javax.swing.JLabel();
        numRefButton = new javax.swing.JRadioButton();
        bulRefButton = new javax.swing.JRadioButton();
        romRefButton = new javax.swing.JRadioButton();
        plnRefButton = new javax.swing.JRadioButton();
        jToolBar1 = new javax.swing.JToolBar();
        openButton = new javax.swing.JButton();
        saveButton = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JToolBar.Separator();
        previewButton = new javax.swing.JButton();
        exportButton = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JToolBar.Separator();
        clearButton = new javax.swing.JButton();
        statusLabel = new javax.swing.JLabel();

        reqListTypeSelect.add(numReqButton);
        reqListTypeSelect.add(bulReqButton);
        reqListTypeSelect.add(romReqButton);
        reqListTypeSelect.add(plnReqButton);
        reqListTypeSelect.setSelected(plnReqButton.getModel(), true);

        matListTypeSelect.add(numMatButton);
        matListTypeSelect.add(bulMatButton);
        matListTypeSelect.add(romMatButton);
        matListTypeSelect.add(plnMatButton);
        matListTypeSelect.setSelected(plnMatButton.getModel(), true);

        refListTypeSelect.add(numRefButton);
        refListTypeSelect.add(bulRefButton);
        refListTypeSelect.add(romRefButton);
        refListTypeSelect.add(plnRefButton);
        refListTypeSelect.setSelected(plnRefButton.getModel(), true);

        setTitle("Syllabus Formatter - XML Editor");
        setResizable(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
        });

        jTabbedPane1.setTabPlacement(javax.swing.JTabbedPane.LEFT);

        detailsPanel.setLayout(new java.awt.BorderLayout());

        detailsLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        detailsLabel.setText("Course Detail");
        detailsPanel.add(detailsLabel, java.awt.BorderLayout.PAGE_START);

        detailsContentPanel.setLayout(new java.awt.GridBagLayout());

        typeLabel.setText("Type: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        detailsContentPanel.add(typeLabel, gridBagConstraints);

        prereqLabel.setText("Prerequisites: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        detailsContentPanel.add(prereqLabel, gridBagConstraints);

        codeLabel.setText("Code: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        detailsContentPanel.add(codeLabel, gridBagConstraints);

        titleLabel.setText("Title: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        detailsContentPanel.add(titleLabel, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(4, 0, 4, 0);
        detailsContentPanel.add(jSeparator3, gridBagConstraints);

        facultyLabel.setText("Faculty: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        detailsContentPanel.add(facultyLabel, gridBagConstraints);

        termLabel.setText("Term: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        detailsContentPanel.add(termLabel, gridBagConstraints);

        roomLabel.setText("Room: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        detailsContentPanel.add(roomLabel, gridBagConstraints);

        codeField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                codeFieldFocusLost(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);
        detailsContentPanel.add(codeField, gridBagConstraints);

        titleField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                titleFieldFocusLost(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);
        detailsContentPanel.add(titleField, gridBagConstraints);

        prereqField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                prereqFieldFocusLost(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);
        detailsContentPanel.add(prereqField, gridBagConstraints);

        typeField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                typeFieldFocusLost(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);
        detailsContentPanel.add(typeField, gridBagConstraints);

        facultyField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                facultyFieldFocusLost(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);
        detailsContentPanel.add(facultyField, gridBagConstraints);

        termField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                termFieldFocusLost(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);
        detailsContentPanel.add(termField, gridBagConstraints);

        roomField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                roomFieldFocusLost(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);
        detailsContentPanel.add(roomField, gridBagConstraints);

        timeLabel.setText("Time: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        detailsContentPanel.add(timeLabel, gridBagConstraints);

        timeField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                timeFieldFocusLost(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        detailsContentPanel.add(timeField, gridBagConstraints);

        detailsPanel.add(detailsContentPanel, java.awt.BorderLayout.CENTER);

        jTabbedPane1.addTab("Details", detailsPanel);

        descriptionPanel.setLayout(new java.awt.BorderLayout());

        descriptionLabel.setFont(new java.awt.Font("Tahoma", 1, 11));
        descriptionLabel.setText("Set Description:");
        descriptionPanel.add(descriptionLabel, java.awt.BorderLayout.PAGE_START);

        descriptionField.setColumns(20);
        descriptionField.setRows(5);
        descriptionField.setWrapStyleWord(true);
        descriptionField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                descriptionFieldFocusLost(evt);
            }
        });
        jScrollPane1.setViewportView(descriptionField);

        descriptionPanel.add(jScrollPane1, java.awt.BorderLayout.CENTER);

        jTabbedPane1.addTab("Description", descriptionPanel);

        objectivesPanel.setLayout(new java.awt.GridBagLayout());

        objectivesContentPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Objectives: ", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        objectivesContentPanel.setLayout(new java.awt.BorderLayout());

        setObjectivesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Set Objectives"));
        setObjectivesPanel.setLayout(new javax.swing.BoxLayout(setObjectivesPanel, javax.swing.BoxLayout.LINE_AXIS));

        addObjField.setPreferredSize(new java.awt.Dimension(255, 20));
        setObjectivesPanel.add(addObjField);

        addObjButton.setText("Add");
        addObjButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addObjButtonActionPerformed(evt);
            }
        });
        setObjectivesPanel.add(addObjButton);

        removeObjButton.setText("Remove");
        removeObjButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removeObjButtonActionPerformed(evt);
            }
        });
        setObjectivesPanel.add(removeObjButton);

        objectivesContentPanel.add(setObjectivesPanel, java.awt.BorderLayout.SOUTH);

        jScrollPane3.setViewportView(objectivesList);

        objectivesContentPanel.add(jScrollPane3, java.awt.BorderLayout.CENTER);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        objectivesPanel.add(objectivesContentPanel, gridBagConstraints);

        preambleContentPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Preamble: ", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        preambleContentPanel.setLayout(new java.awt.BorderLayout());

        preambleField.setColumns(20);
        preambleField.setLineWrap(true);
        preambleField.setRows(5);
        preambleField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                preambleFieldFocusLost(evt);
            }
        });
        jScrollPane2.setViewportView(preambleField);

        preambleContentPanel.add(jScrollPane2, java.awt.BorderLayout.CENTER);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
        gridBagConstraints.weightx = 1.0;
        objectivesPanel.add(preambleContentPanel, gridBagConstraints);

        jTabbedPane1.addTab("Objectives", objectivesPanel);

        topicsPanel.setLayout(new java.awt.BorderLayout());

        setTopicsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Set Topics"));
        setTopicsPanel.setLayout(new java.awt.GridBagLayout());

        weekLabel.setText("Week: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        setTopicsPanel.add(weekLabel, gridBagConstraints);

        nameLabel.setText("Name: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        setTopicsPanel.add(nameLabel, gridBagConstraints);

        hoursLabel.setText("Hours: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);
        setTopicsPanel.add(hoursLabel, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);
        setTopicsPanel.add(nameField, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);
        setTopicsPanel.add(weekField, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);
        setTopicsPanel.add(hoursField, gridBagConstraints);

        jPanel11.setLayout(new java.awt.GridBagLayout());

        addTopicButton.setText("Add");
        addTopicButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addTopicButtonActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        jPanel11.add(addTopicButton, gridBagConstraints);

        removeTopicButton.setText("Remove");
        removeTopicButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removeTopicButtonActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        jPanel11.add(removeTopicButton, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        jPanel11.add(jPanel12, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 0, 0);
        setTopicsPanel.add(jPanel11, gridBagConstraints);

        topicsPanel.add(setTopicsPanel, java.awt.BorderLayout.PAGE_END);

        topicsList.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Week", "Topic Name", "Hours"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane4.setViewportView(topicsList);
        topicsList.getColumnModel().getColumn(0).setResizable(false);
        topicsList.getColumnModel().getColumn(1).setResizable(false);
        topicsList.getColumnModel().getColumn(2).setResizable(false);

        topicsPanel.add(jScrollPane4, java.awt.BorderLayout.CENTER);

        jTabbedPane1.addTab("Topics", topicsPanel);

        requirementsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Set Requirements", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        requirementsPanel.setLayout(new java.awt.BorderLayout());

        jScrollPane8.setViewportView(requirementsList);

        requirementsPanel.add(jScrollPane8, java.awt.BorderLayout.CENTER);

        setRequirementsPanel.setLayout(new javax.swing.BoxLayout(setRequirementsPanel, javax.swing.BoxLayout.LINE_AXIS));

        addReqField.setPreferredSize(new java.awt.Dimension(255, 20));
        setRequirementsPanel.add(addReqField);

        addReqButton.setText("Add");
        addReqButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addReqButtonActionPerformed(evt);
            }
        });
        setRequirementsPanel.add(addReqButton);

        removeReqButton.setText("Remove");
        setRequirementsPanel.add(removeReqButton);

        requirementsPanel.add(setRequirementsPanel, java.awt.BorderLayout.SOUTH);

        setReqListTypePanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        reqListLabel.setText("List Type:");
        setReqListTypePanel.add(reqListLabel);

        numReqButton.setText("Numbered");
        numReqButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                numReqButtonActionPerformed(evt);
            }
        });
        setReqListTypePanel.add(numReqButton);

        bulReqButton.setText("Bulleted");
        bulReqButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bulReqButtonActionPerformed(evt);
            }
        });
        setReqListTypePanel.add(bulReqButton);

        romReqButton.setText("Roman");
        romReqButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                romReqButtonActionPerformed(evt);
            }
        });
        setReqListTypePanel.add(romReqButton);

        plnReqButton.setText("Plain");
        plnReqButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                plnReqButtonActionPerformed(evt);
            }
        });
        setReqListTypePanel.add(plnReqButton);

        requirementsPanel.add(setReqListTypePanel, java.awt.BorderLayout.PAGE_START);

        jTabbedPane1.addTab("Reqs.", requirementsPanel);

        assessmentPanel.setLayout(new java.awt.BorderLayout());

        assessList.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Item", "Value"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane5.setViewportView(assessList);
        assessList.getColumnModel().getColumn(0).setResizable(false);
        assessList.getColumnModel().getColumn(1).setResizable(false);

        assessmentPanel.add(jScrollPane5, java.awt.BorderLayout.CENTER);

        setAssessPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Set Assessment Components"));
        setAssessPanel.setLayout(new java.awt.GridBagLayout());

        itemLabel.setText("Item: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        setAssessPanel.add(itemLabel, gridBagConstraints);

        valueLabel.setText("Value: ");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 0);
        setAssessPanel.add(valueLabel, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);
        setAssessPanel.add(itemField, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 0.4;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 2, 0);
        setAssessPanel.add(valueField, gridBagConstraints);

        jPanel14.setLayout(new java.awt.GridBagLayout());

        addAssessButton.setText("Add");
        addAssessButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addAssessButtonActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        jPanel14.add(addAssessButton, gridBagConstraints);

        removeAssessButton.setText("Remove");
        removeAssessButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removeAssessButtonActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        jPanel14.add(removeAssessButton, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        jPanel14.add(jPanel15, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(2, 0, 0, 0);
        setAssessPanel.add(jPanel14, gridBagConstraints);

        assessmentPanel.add(setAssessPanel, java.awt.BorderLayout.PAGE_END);

        jTabbedPane1.addTab("Assessment", assessmentPanel);

        materialsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Set Text/Materials", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        materialsPanel.setLayout(new java.awt.BorderLayout());

        jScrollPane7.setViewportView(materialsList);

        materialsPanel.add(jScrollPane7, java.awt.BorderLayout.CENTER);

        setMaterialsPanel.setLayout(new javax.swing.BoxLayout(setMaterialsPanel, javax.swing.BoxLayout.LINE_AXIS));

        addMatField.setPreferredSize(new java.awt.Dimension(255, 20));
        setMaterialsPanel.add(addMatField);

        addMatButton.setText("Add");
        addMatButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addMatButtonActionPerformed(evt);
            }
        });
        setMaterialsPanel.add(addMatButton);

        removeMatButton.setText("Remove");
        removeMatButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removeMatButtonActionPerformed(evt);
            }
        });
        setMaterialsPanel.add(removeMatButton);

        materialsPanel.add(setMaterialsPanel, java.awt.BorderLayout.SOUTH);

        setMatListTypePanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        matListLabel.setText("List Type:");
        setMatListTypePanel.add(matListLabel);

        numMatButton.setText("Numbered");
        numMatButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                numMatButtonActionPerformed(evt);
            }
        });
        setMatListTypePanel.add(numMatButton);

        bulMatButton.setText("Bulleted");
        bulMatButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bulMatButtonActionPerformed(evt);
            }
        });
        setMatListTypePanel.add(bulMatButton);

        romMatButton.setText("Roman");
        romMatButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                romMatButtonActionPerformed(evt);
            }
        });
        setMatListTypePanel.add(romMatButton);

        plnMatButton.setText("Plain");
        plnMatButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                plnMatButtonActionPerformed(evt);
            }
        });
        setMatListTypePanel.add(plnMatButton);

        materialsPanel.add(setMatListTypePanel, java.awt.BorderLayout.PAGE_START);

        jTabbedPane1.addTab("Materials", materialsPanel);

        referencesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Set References", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        referencesPanel.setLayout(new java.awt.BorderLayout());

        jScrollPane6.setViewportView(referencesList);

        referencesPanel.add(jScrollPane6, java.awt.BorderLayout.CENTER);

        setRefPanel.setLayout(new javax.swing.BoxLayout(setRefPanel, javax.swing.BoxLayout.LINE_AXIS));

        addRefField.setPreferredSize(new java.awt.Dimension(255, 20));
        setRefPanel.add(addRefField);

        addRefButton.setText("Add");
        addRefButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addRefButtonActionPerformed(evt);
            }
        });
        setRefPanel.add(addRefButton);

        removeRefButton.setText("Remove");
        removeRefButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                removeRefButtonActionPerformed(evt);
            }
        });
        setRefPanel.add(removeRefButton);

        referencesPanel.add(setRefPanel, java.awt.BorderLayout.SOUTH);

        setMatListTypePanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        matListLabel1.setText("List Type:");
        setMatListTypePanel1.add(matListLabel1);

        numRefButton.setText("Numbered");
        numRefButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                numRefButtonActionPerformed(evt);
            }
        });
        setMatListTypePanel1.add(numRefButton);

        bulRefButton.setText("Bulleted");
        bulRefButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bulRefButtonActionPerformed(evt);
            }
        });
        setMatListTypePanel1.add(bulRefButton);

        romRefButton.setText("Roman");
        romRefButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                romRefButtonActionPerformed(evt);
            }
        });
        setMatListTypePanel1.add(romRefButton);

        plnRefButton.setText("Plain");
        plnRefButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                plnRefButtonActionPerformed(evt);
            }
        });
        setMatListTypePanel1.add(plnRefButton);

        referencesPanel.add(setMatListTypePanel1, java.awt.BorderLayout.PAGE_START);

        jTabbedPane1.addTab("References", referencesPanel);

        getContentPane().add(jTabbedPane1, java.awt.BorderLayout.CENTER);

        jToolBar1.setFloatable(false);
        jToolBar1.setRollover(true);

        openButton.setText("Open");
        openButton.setFocusable(false);
        openButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        openButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        openButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                openButtonActionPerformed(evt);
            }
        });
        jToolBar1.add(openButton);

        saveButton.setText("Save");
        saveButton.setFocusable(false);
        saveButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        saveButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        saveButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                saveButtonActionPerformed(evt);
            }
        });
        jToolBar1.add(saveButton);
        jToolBar1.add(jSeparator1);

        previewButton.setText("Preview");
        previewButton.setFocusable(false);
        previewButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        previewButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        previewButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                previewButtonActionPerformed(evt);
            }
        });
        jToolBar1.add(previewButton);

        exportButton.setText("Export");
        exportButton.setFocusable(false);
        exportButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        exportButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        exportButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exportButtonActionPerformed(evt);
            }
        });
        jToolBar1.add(exportButton);
        jToolBar1.add(jSeparator2);

        clearButton.setText("Clear");
        clearButton.setFocusable(false);
        clearButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        clearButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        clearButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                clearButtonActionPerformed(evt);
            }
        });
        jToolBar1.add(clearButton);

        getContentPane().add(jToolBar1, java.awt.BorderLayout.PAGE_START);

        statusLabel.setText(" ");
        statusLabel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        getContentPane().add(statusLabel, java.awt.BorderLayout.PAGE_END);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
        if(changed){
            int ch=JOptionPane.showConfirmDialog(this, "Do you want to save your changes?",
                    "Syllabus Formatter",JOptionPane.YES_NO_OPTION);
            if(ch==JOptionPane.YES_OPTION)
                save();
            dispose();
        }
    }//GEN-LAST:event_formWindowClosing

    private void codeFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_codeFieldFocusLost
        String temp="";
        if((temp=codeField.getText())!=null&&!temp.isEmpty()){
            output.setCourseCode(temp);
            changed=true;
        }
    }//GEN-LAST:event_codeFieldFocusLost

    private void titleFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_titleFieldFocusLost
        String temp="";
        if((temp=titleField.getText())!=null&&!temp.isEmpty()){
            output.setCourseTitle(temp);
            changed=true;
        }
    }//GEN-LAST:event_titleFieldFocusLost

    private void prereqFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_prereqFieldFocusLost
        String temp="";
        java.util.ArrayList<String> temps=new java.util.ArrayList<String>();
        if((temp=prereqField.getText())!=null&&!temp.isEmpty()){
            for(int i=0;i<temp.length();){
                int j=temp.indexOf(',',i);
                if(j<0)
                    j=temp.length();
                temps.add(temp.substring(i,j));
                j++;
                i+=j-i;
            }
            output.setPreRequisiteCourses(temps);
            changed=true;
        }
    }//GEN-LAST:event_prereqFieldFocusLost

    private void typeFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_typeFieldFocusLost
        String temp="";
        if((temp=typeField.getText())!=null&&!temp.isEmpty()){
            output.setCourseType(temp);
            changed=true;
        }
    }//GEN-LAST:event_typeFieldFocusLost

    private void facultyFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_facultyFieldFocusLost
        String temp="";
        if((temp=facultyField.getText())!=null&&!temp.isEmpty()){
            output.setFaculty(temp);
            changed=true;
        }
    }//GEN-LAST:event_facultyFieldFocusLost

    private void termFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_termFieldFocusLost
        String temp="";
        if((temp=termField.getText())!=null&&!temp.isEmpty()){
            output.setTerm(temp);
            changed=true;
        }
    }//GEN-LAST:event_termFieldFocusLost

    private void roomFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_roomFieldFocusLost
        String temp="";
        if((temp=roomField.getText())!=null&&!temp.isEmpty()){
            output.setRoom(temp);
            changed=true;
        }
    }//GEN-LAST:event_roomFieldFocusLost

    private void timeFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_timeFieldFocusLost
        String temp="";
        if((temp=timeField.getText())!=null&&!temp.isEmpty()){
            output.setTime(temp);
            changed=true;
        }
    }//GEN-LAST:event_timeFieldFocusLost

    private void descriptionFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_descriptionFieldFocusLost
        String temp="";
        if((temp=descriptionField.getText())!=null&&!temp.isEmpty()){
            output.setCourseDesc(temp);
            changed=true;
        }
    }//GEN-LAST:event_descriptionFieldFocusLost

    private void preambleFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_preambleFieldFocusLost
        String temp="";
        if((temp=preambleField.getText())!=null&&!temp.isEmpty()){
            output.setObjectivePreamble(temp);
            changed=true;
        }
    }//GEN-LAST:event_preambleFieldFocusLost

    private void addObjButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addObjButtonActionPerformed
        String temp="";
        if((temp=addObjField.getText())!=null&&!temp.isEmpty()){
            javax.swing.DefaultListModel l=new javax.swing.DefaultListModel();
            output.getObjectives().add(temp);
            for(String s:output.getObjectives())
                l.addElement(s);
            objectivesList.setModel(l);
            addObjField.setText("");
            changed=true;
        }
    }//GEN-LAST:event_addObjButtonActionPerformed

    private void addReqButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addReqButtonActionPerformed
        String temp="";
        if((temp=addReqField.getText())!=null&&!temp.isEmpty()){
            javax.swing.DefaultListModel l=new javax.swing.DefaultListModel();
            output.getRequirements().add(temp);
            for(String s:output.getRequirements())
                l.addElement(s);
            requirementsList.setModel(l);
            addReqField.setText("");
            changed=true;
        }
    }//GEN-LAST:event_addReqButtonActionPerformed

    private void addRefButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addRefButtonActionPerformed
        String temp="";
        if((temp=addRefField.getText())!=null&&!temp.isEmpty()){
            javax.swing.DefaultListModel l=new javax.swing.DefaultListModel();
            output.getReferences().add(temp);
            for(String s:output.getReferences())
                l.addElement(s);
            referencesList.setModel(l);
            addRefField.setText("");
            changed=true;
        }
    }//GEN-LAST:event_addRefButtonActionPerformed

    private void addMatButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addMatButtonActionPerformed
        String temp="";
        if((temp=addReqField.getText())!=null&&!temp.isEmpty()){
            javax.swing.DefaultListModel l=new javax.swing.DefaultListModel();
            output.getMaterials().add(temp);
            for(String s:output.getMaterials())
                l.addElement(s);
            materialsList.setModel(l);
            addMatField.setText("");
            changed=true;
        }
    }//GEN-LAST:event_addMatButtonActionPerformed

    private void numReqButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_numReqButtonActionPerformed
        if(numReqButton.isSelected()){
            output.setRequirementListType("numbered");
            changed=true;
        }
    }//GEN-LAST:event_numReqButtonActionPerformed

    private void bulReqButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bulReqButtonActionPerformed
        if(bulReqButton.isSelected()){
            output.setRequirementListType("bulleted");
            changed=true;
        }
    }//GEN-LAST:event_bulReqButtonActionPerformed

    private void romReqButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_romReqButtonActionPerformed
        if(romReqButton.isSelected()){
            output.setRequirementListType("roman");
            changed=true;
        }
    }//GEN-LAST:event_romReqButtonActionPerformed

    private void plnReqButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_plnReqButtonActionPerformed
        if(romReqButton.isSelected()){
            output.setRequirementListType("");
            changed=true;
        }
    }//GEN-LAST:event_plnReqButtonActionPerformed

    private void numMatButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_numMatButtonActionPerformed
        if(numMatButton.isSelected()){
            output.setMaterialListType("numbered");
            changed=true;
        }
    }//GEN-LAST:event_numMatButtonActionPerformed

    private void bulMatButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bulMatButtonActionPerformed
        if(bulMatButton.isSelected()){
            output.setMaterialListType("bulleted");
            changed=true;
        }
    }//GEN-LAST:event_bulMatButtonActionPerformed

    private void romMatButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_romMatButtonActionPerformed
        if(romMatButton.isSelected()){
            output.setMaterialListType("roman");
            changed=true;
        }
    }//GEN-LAST:event_romMatButtonActionPerformed

    private void plnMatButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_plnMatButtonActionPerformed
        if(plnMatButton.isSelected()){
            output.setMaterialListType("");
            changed=true;
        }
    }//GEN-LAST:event_plnMatButtonActionPerformed

    private void numRefButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_numRefButtonActionPerformed
        if(numRefButton.isSelected()){
            output.setReferenceListType("numbered");
            changed=true;
        }
    }//GEN-LAST:event_numRefButtonActionPerformed

    private void bulRefButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bulRefButtonActionPerformed
        if(bulRefButton.isSelected()){
            output.setReferenceListType("bulleted");
            changed=true;
        }
    }//GEN-LAST:event_bulRefButtonActionPerformed

    private void romRefButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_romRefButtonActionPerformed
        if(romRefButton.isSelected()){
            output.setReferenceListType("roman");
            changed=true;
        }
    }//GEN-LAST:event_romRefButtonActionPerformed

    private void plnRefButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_plnRefButtonActionPerformed
        if(plnRefButton.isSelected()){
            output.setReferenceListType("");
            changed=true;
        }
    }//GEN-LAST:event_plnRefButtonActionPerformed

    private void addTopicButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addTopicButtonActionPerformed
        String name=nameField.getText();
        String week=weekField.getText();
        String hrs=hoursField.getText();
        javax.swing.table.DefaultTableModel l=new javax.swing.table.DefaultTableModel();
        l.setColumnIdentifiers(new String[]{"Week","Topic Name","Hours"});
        if(name!=null&&!name.isEmpty()&&
           week!=null&&!week.isEmpty()&&
           hrs!=null&&!hrs.isEmpty()){
            output.getTopics().add(output.createTopic(name, week, hrs));
            for(Object t:output.getTopics()){
                String[] row={
                    Syllabus.getTopicName(t),
                    Syllabus.getTopicWeek(t),
                    Syllabus.getTopicHour(t)
                };
                l.addRow(row);
            }
            topicsList.setModel(l);
            nameField.setText("");
            weekField.setText("");
            hoursField.setText("");
            changed=true;
            statusLabel.setText("Topic");
        }
    }//GEN-LAST:event_addTopicButtonActionPerformed

    private void addAssessButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addAssessButtonActionPerformed
        String item=itemField.getText();
        String value=valueField.getText();
        javax.swing.table.DefaultTableModel l=new javax.swing.table.DefaultTableModel();
        l.setColumnIdentifiers(new String[]{"Item","Value"});
        if(item!=null&&!item.isEmpty()&&
           value!=null&&!value.isEmpty()){
            output.getAssessments().add(output.createAssessment(item, value));
            for(Object t:output.getAssessments()){
                String[] row={
                    Syllabus.getAssessmentItem(t),
                    Syllabus.getAssessmentValue(t)
                };
                l.addRow(row);
            }
            assessList.setModel(l);
            itemField.setText("");
            valueField.setText("");
            changed=true;
        }
    }//GEN-LAST:event_addAssessButtonActionPerformed

    private void removeObjButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeObjButtonActionPerformed
        int ch=objectivesList.getSelectedIndex();
        if(ch>=0){
            output.getObjectives().remove(ch);
            javax.swing.DefaultListModel l=new javax.swing.DefaultListModel();
            for(String s:output.getObjectives())
                l.addElement(s);
            objectivesList.setModel(l);
            changed=true;
        }
    }//GEN-LAST:event_removeObjButtonActionPerformed

    private void removeAssessButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeAssessButtonActionPerformed
        int ch=assessList.getSelectedRow();
        javax.swing.table.DefaultTableModel l=new javax.swing.table.DefaultTableModel();
        l.setColumnIdentifiers(new String[]{"Item","Value"});
        if(ch>=0){
            output.getAssessments().remove(ch);
            for(Object t:output.getAssessments()){
                String[] row={
                    Syllabus.getAssessmentItem(t),
                    Syllabus.getAssessmentValue(t)
                };
                l.addRow(row);
            }
            assessList.setModel(l);
            changed=true;
        }
    }//GEN-LAST:event_removeAssessButtonActionPerformed

    private void removeMatButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeMatButtonActionPerformed
        int ch=materialsList.getSelectedIndex();
        if(ch>=0){
            output.getMaterials().remove(ch);
            javax.swing.DefaultListModel l=new javax.swing.DefaultListModel();
            for(String s:output.getMaterials())
                l.addElement(s);
            materialsList.setModel(l);
            changed=true;
        }
    }//GEN-LAST:event_removeMatButtonActionPerformed

    private void removeRefButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeRefButtonActionPerformed
        int ch=referencesList.getSelectedIndex();
        if(ch>=0){
            output.getReferences().remove(ch);
            javax.swing.DefaultListModel l=new javax.swing.DefaultListModel();
            for(String s:output.getReferences())
                l.addElement(s);
            referencesList.setModel(l);
            changed=true;
        }
    }//GEN-LAST:event_removeRefButtonActionPerformed

    private void removeTopicButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeTopicButtonActionPerformed
        int ch=topicsList.getSelectedRow();
        javax.swing.table.DefaultTableModel l=new javax.swing.table.DefaultTableModel();
        l.setColumnIdentifiers(new String[]{"Week","Topic Name","Hours"});
        if(ch>=0){
            output.getTopics().remove(ch);
            for(Object t:output.getTopics()){
                String[] row={
                    Syllabus.getTopicName(t),
                    Syllabus.getTopicWeek(t),
                    Syllabus.getTopicHour(t)
                };
                l.addRow(row);
            }
            topicsList.setModel(l);
            changed=true;
        }
    }//GEN-LAST:event_removeTopicButtonActionPerformed

    private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveButtonActionPerformed
        save();
    }//GEN-LAST:event_saveButtonActionPerformed

    private void exportButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exportButtonActionPerformed
        String name=output.getCourseCode()+" "+output.getTerm()+".pdf";
        fileSelect.setDialogTitle("Export to PDF");
        if(output.getCourseCode()==null||output.getTerm()==null||
           output.getCourseCode().isEmpty()||output.getTerm().isEmpty())
            name="output.pdf";
        fileSelect.setFileFilter(new javax.swing.filechooser.FileFilter() {
            public String getDescription() {
                return "Portable Document Format (*.pdf)";
            }
            @Override
            public boolean accept(java.io.File arg0) {
            	if (arg0.getName().endsWith(".pdf") || arg0.isDirectory())
                    return true;
		else
                    return false;
            }
	});
        try{
            fileSelect.setSelectedFile(new java.io.File(name));
            if(fileSelect.showSaveDialog(this)==JFileChooser.APPROVE_OPTION){
                java.io.File out=fileSelect.getSelectedFile();
                if(!out.getAbsolutePath().endsWith(".pdf"))
                    out.renameTo(new java.io.File(out.getAbsolutePath()+".pdf"));
                if(!out.exists())
                    new org.dlsu.pdfgen.Formatter(output, out.getAbsolutePath());
                else if(out.exists()&&JOptionPane.showConfirmDialog(this,
                        "The selected file exists. Overwrite?",
                        "Syllabus Formatter", JOptionPane.YES_NO_OPTION)
                        ==JOptionPane.YES_OPTION)
                    new org.dlsu.pdfgen.Formatter(output, out.getAbsolutePath());
            }
        }
        catch(com.itextpdf.text.DocumentException dx){}
        catch(java.io.FileNotFoundException fx){
            fx.printStackTrace();
        }
    }//GEN-LAST:event_exportButtonActionPerformed

    private void clearButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearButtonActionPerformed
        if(JOptionPane.showConfirmDialog(this,
            "Are you sure you want to clear all information?",
            "Syllabus Formatter", JOptionPane.YES_NO_OPTION)
            ==JOptionPane.YES_OPTION){
            dispose();
            new XMLEditorWindow();
        }
    }//GEN-LAST:event_clearButtonActionPerformed

    private void previewButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_previewButtonActionPerformed
        try{
            java.io.File out=java.io.File.createTempFile("output", ".pdf");
            new org.dlsu.pdfgen.Formatter(output,out.getAbsolutePath());
            out.deleteOnExit();
            new PDFPreviewWindow(out.getAbsolutePath());
        }
        catch(Exception x){}
    }//GEN-LAST:event_previewButtonActionPerformed

    private void openButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openButtonActionPerformed
        fileSelect.setDialogTitle("Open Syllabus XML");
        fileSelect.setFileFilter(new javax.swing.filechooser.FileFilter() {
            public String getDescription() {
                return "Extensible Markup Language (*.xml)";
            }
            @Override
            public boolean accept(java.io.File arg0) {
            	if (arg0.getName().endsWith(".xml") || arg0.isDirectory())
                    return true;
		else
                    return false;
            }
	});
        if(fileSelect.showOpenDialog(this)==javax.swing.JFileChooser.APPROVE_OPTION){
            java.io.File s=fileSelect.getSelectedFile();
            if (s.getName().endsWith(".xml")) {
                System.out.println("XML file passed.");
		try{
                    output=org.dlsu.pdfgen.io.XMLReader.getInstance()
                            .readSyllabus(s.getAbsolutePath());
                    parseContent(output);
                }
                catch(org.dlsu.pdfgen.exceptions.InvalidXMLFileFormatException x) {}
            }
            else {
		System.err.println("Not an XML file.");
		JOptionPane.showMessageDialog(this,
                    "The file you selected was not an XML file.",
                    "File Extension Mismatch", JOptionPane.ERROR_MESSAGE);
            }
        }
    }//GEN-LAST:event_openButtonActionPerformed

    public void save(){
        String name=output.getCourseCode()+" "+output.getTerm()+".pdf";
        fileSelect.setDialogTitle("Save XML");
        if(output.getCourseCode()==null||output.getTerm()==null||
           output.getCourseCode().isEmpty()||output.getTerm().isEmpty())
            name="output.xml";
        fileSelect.setFileFilter(new javax.swing.filechooser.FileFilter() {
            public String getDescription() {
                return "Extensible Markup Language (*.xml)";
            }
            @Override
            public boolean accept(java.io.File arg0) {
            	if (arg0.getName().endsWith(".xml") || arg0.isDirectory())
                    return true;
		else
                    return false;
            }
	});
        fileSelect.setSelectedFile(new java.io.File(name));
        if(fileSelect.showSaveDialog(this)==JFileChooser.APPROVE_OPTION){
            java.io.File out=fileSelect.getSelectedFile();
            if(!out.getAbsolutePath().endsWith(".xml"))
                out.renameTo(new java.io.File(out.getAbsolutePath()+".xml"));
            if(!out.exists())
                saveFile(out);
            else if(out.exists()&&JOptionPane.showConfirmDialog(this,
                    "The selected file exists. Overwrite?",
                    org.dlsu.pdfgen.Controller.title, JOptionPane.YES_NO_OPTION)
                    ==JOptionPane.YES_OPTION)
                saveFile(out);
        }
    }
    /*
     * Save process for XML.
     */
    public void saveFile(java.io.File file){
        try {
            java.io.OutputStreamWriter out = new java.io.OutputStreamWriter(
                    new java.io.BufferedOutputStream(
                        new java.io.FileOutputStream(file)
                    )
                );
            out.write("<?xml version=\"1.0\"?>\n");
            out.write("<syllabus>\n");
            out.write("\t<code>" + output.getCourseCode() + "</code>\n");
            out.write("\t<title>" + output.getCourseTitle() + "</title>\n");
            out.write("\t<prereqs>\n");
            for(String s:output.getPreRequisiteCourses())
                out.write("\t\t<pre>" + s + "</pre>\n");
            out.write("\t</prereqs>\n");
            out.write("\t<postreqs>\n");
            out.write("\t\t<post></post>\n");
            out.write("\t</postreqs>\n");
            out.write("\t<type>" + output.getCourseType() + "</type>\n");
            out.write("\t<faculty>" + output.getFaculty() + "</faculty>\n");
            out.write("\t<term>" + output.getTerm() + "</term>\n");
            out.write("\t<time>" + output.getTime() + "</time>\n");
            out.write("\t<room>" + output.getRoom() + "</room>\n");
            out.write("\t<description>" + output.getCourseDesc()
		+ "</description>\n");
            out.write("\t<objectives>\n");
            out.write("\t\t<preamble>" + output.getObjectivePreamble()
		+ "</preamble>\n");
            for (String s:output.getObjectives())
		out.write("\t\t<objective>"+ s + "</objective>\n");
            out.write("\t</objectives>\n");
            out.write("\t<topics>\n");
            for (Object s:output.getTopics()) {
                out.write("\t\t<topic>\n");
		out.write("\t\t\t\t<week>" + Syllabus.getTopicWeek(s)
                    + "</week>\n");
		out.write("\t\t\t\t<name>" + Syllabus.getTopicName(s)
                    + "</name>\n");
		out.write("\t\t\t\t<hour>" + Syllabus.getTopicHour(s)
                    + "</hour>\n");
		out.write("\t\t</topic>\n");
            }
            out.write("\t</topics>\n");
            out.write("\t<requirements listType=\"" +
                output.getRequirementListType() + "\">\n");
            for (String s:output.getRequirements())
		out.write("\t\t<req>" + s + "</req>\n");
            out.write("\t</requirements>\n");
            out.write("\t<assessments>\n");
            for (Object s:output.getAssessments()) {
		out.write("\t\t<assessment>\n");
		out.write("\t\t\t\t<item>" + Syllabus.getAssessmentItem(s)
                    + "</item>\n");
		out.write("\t\t\t\t<value>" + Syllabus.getAssessmentValue(s)
                    + "</value>\n");
		out.write("\t\t</assessment>\n");
            }
            out.write("\t</assessments>\n");
            out.write("\t<materials listType=\"" + output.getMaterialListType()
		 + "\">\n");
            for (String s:output.getMaterials())
		out.write("\t\t<material>" + s + "</material>\n");
            out.write("\t</materials>\n");
            out.write("\t<references listType=\""+ output.getReferenceListType()
                 + "\">\n");
            for (String s:output.getReferences())
		out.write("\t\t<ref>" + s + "</ref>\n");
            out.write("\t</references>\n");
            out.write("</syllabus>");
            out.flush();
            out.close();
	}
        catch (Exception e) {
            e.printStackTrace();
        }
    }

    /*
     * Retrieves the content of the Syllabus data and organizes them
     * into the appropriate fields.
     */
    public void parseContent(org.dlsu.pdfgen.struct.Syllabus s){
        // container for lists (e.g. Objectives)
        javax.swing.DefaultListModel l;
        // container for table-like lists (e.g. Topics)
        javax.swing.table.DefaultTableModel t;
        // container for list type
        String listType;
        
        // Course code
        codeField.setText(s.getCourseCode());
        
        // Course title
        titleField.setText(s.getCourseTitle());
        
        // Course prerequisites
        prereqField.setText("");
        java.util.ArrayList<String> temp=s.getPreRequisiteCourses();
        for(int i=0; i<temp.size(); i++){
            prereqField.setText(prereqField.getText()+temp.get(i));
            if(i<temp.size()-1)
                prereqField.setText(prereqField.getText()+",");
        }
        
        // Course type
        typeField.setText(s.getCourseType());
        
        // Faculty
        facultyField.setText(s.getFaculty());
        
        // Academic Year/Term
        termField.setText(s.getTerm());
        
        // Room
        roomField.setText(s.getRoom());
        
        // Time
        timeField.setText(s.getTime());
        
        // Description
        descriptionField.setText(s.getCourseDesc());
        
        // Preamble
        preambleField.setText(s.getObjectivePreamble());
        
        // Objectives
        l=new javax.swing.DefaultListModel();
        for(String e:s.getObjectives())
            l.addElement(e);
        objectivesList.setModel(l);
        
        // Topics
        t=new javax.swing.table.DefaultTableModel();
        t.setColumnIdentifiers(new String[]{"Week","Topic Name","Hours"});
        for(Object e:s.getTopics()){
            String[] row={
                Syllabus.getTopicName(e),
                Syllabus.getTopicWeek(e),
                Syllabus.getTopicHour(e)
            };
            t.addRow(row);
        }
        topicsList.setModel(t);
        
        // Requirements
        listType=s.getRequirementListType();
        if(listType.equalsIgnoreCase("numbered"))
            numReqButton.setSelected(true);
        else if(listType.equalsIgnoreCase("bulleted"))
            bulReqButton.setSelected(true);
        else if(listType.equalsIgnoreCase("roman"))
            romReqButton.setSelected(true);
        else
            plnReqButton.setSelected(true);
        l=new javax.swing.DefaultListModel();
        for(String e:s.getRequirements())
            l.addElement(e);
        requirementsList.setModel(l);
        
        // Assessments
        t=new javax.swing.table.DefaultTableModel();
        t.setColumnIdentifiers(new String[]{"Item","Value"});
        for(Object e:output.getAssessments()){
            String[] row={
                Syllabus.getAssessmentItem(e),
                Syllabus.getAssessmentValue(e)
            };
            t.addRow(row);
        }
        assessList.setModel(t);
            
        // Text/Materials
        listType=s.getMaterialListType();
        if(listType.equalsIgnoreCase("numbered"))
            matListTypeSelect.setSelected(numMatButton.getModel(), true);
        else if(listType.equalsIgnoreCase("bulleted"))
            matListTypeSelect.setSelected(bulMatButton.getModel(), true);
        else if(listType.equalsIgnoreCase("roman"))
            matListTypeSelect.setSelected(romMatButton.getModel(), true);
        else
            matListTypeSelect.setSelected(plnMatButton.getModel(), true);
        l=new javax.swing.DefaultListModel();
        for(String e:s.getMaterials())
            l.addElement(e);
        materialsList.setModel(l);
        
        // References
        listType=s.getReferenceListType();
        if(listType.equalsIgnoreCase("numbered"))
            numRefButton.setSelected(true);
        else if(listType.equalsIgnoreCase("bulleted"))
            bulRefButton.setSelected(true);
        else if(listType.equalsIgnoreCase("roman"))
            romRefButton.setSelected(true);
        else
            plnRefButton.setSelected(true);
        l=new javax.swing.DefaultListModel();
        for(String e:s.getReferences())
            l.addElement(e);
        referencesList.setModel(l);
        
        // Reset changes
        changed=false;
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton addAssessButton;
    private javax.swing.JButton addMatButton;
    private javax.swing.JTextField addMatField;
    private javax.swing.JButton addObjButton;
    private javax.swing.JTextField addObjField;
    private javax.swing.JButton addRefButton;
    private javax.swing.JTextField addRefField;
    private javax.swing.JButton addReqButton;
    private javax.swing.JTextField addReqField;
    private javax.swing.JButton addTopicButton;
    private javax.swing.JTable assessList;
    private javax.swing.JPanel assessmentPanel;
    private javax.swing.JRadioButton bulMatButton;
    private javax.swing.JRadioButton bulRefButton;
    private javax.swing.JRadioButton bulReqButton;
    private javax.swing.JButton clearButton;
    private javax.swing.JTextField codeField;
    private javax.swing.JLabel codeLabel;
    private javax.swing.JTextArea descriptionField;
    private javax.swing.JLabel descriptionLabel;
    private javax.swing.JPanel descriptionPanel;
    private javax.swing.JPanel detailsContentPanel;
    private javax.swing.JLabel detailsLabel;
    private javax.swing.JPanel detailsPanel;
    private javax.swing.JButton exportButton;
    private javax.swing.JTextField facultyField;
    private javax.swing.JLabel facultyLabel;
    private javax.swing.JFileChooser fileSelect;
    private javax.swing.JTextField hoursField;
    private javax.swing.JLabel hoursLabel;
    private javax.swing.JTextField itemField;
    private javax.swing.JLabel itemLabel;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JToolBar.Separator jSeparator1;
    private javax.swing.JToolBar.Separator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JLabel matListLabel;
    private javax.swing.JLabel matListLabel1;
    private javax.swing.ButtonGroup matListTypeSelect;
    private javax.swing.JList materialsList;
    private javax.swing.JPanel materialsPanel;
    private javax.swing.JTextField nameField;
    private javax.swing.JLabel nameLabel;
    private javax.swing.JRadioButton numMatButton;
    private javax.swing.JRadioButton numRefButton;
    private javax.swing.JRadioButton numReqButton;
    private javax.swing.JPanel objectivesContentPanel;
    private javax.swing.JList objectivesList;
    private javax.swing.JPanel objectivesPanel;
    private javax.swing.JButton openButton;
    private javax.swing.JRadioButton plnMatButton;
    private javax.swing.JRadioButton plnRefButton;
    private javax.swing.JRadioButton plnReqButton;
    private javax.swing.JPanel preambleContentPanel;
    private javax.swing.JTextArea preambleField;
    private javax.swing.JTextField prereqField;
    private javax.swing.JLabel prereqLabel;
    private javax.swing.JButton previewButton;
    private javax.swing.ButtonGroup refListTypeSelect;
    private javax.swing.JList referencesList;
    private javax.swing.JPanel referencesPanel;
    private javax.swing.JButton removeAssessButton;
    private javax.swing.JButton removeMatButton;
    private javax.swing.JButton removeObjButton;
    private javax.swing.JButton removeRefButton;
    private javax.swing.JButton removeReqButton;
    private javax.swing.JButton removeTopicButton;
    private javax.swing.JLabel reqListLabel;
    private javax.swing.ButtonGroup reqListTypeSelect;
    private javax.swing.JList requirementsList;
    private javax.swing.JPanel requirementsPanel;
    private javax.swing.JRadioButton romMatButton;
    private javax.swing.JRadioButton romRefButton;
    private javax.swing.JRadioButton romReqButton;
    private javax.swing.JTextField roomField;
    private javax.swing.JLabel roomLabel;
    private javax.swing.JButton saveButton;
    private javax.swing.JPanel setAssessPanel;
    private javax.swing.JPanel setMatListTypePanel;
    private javax.swing.JPanel setMatListTypePanel1;
    private javax.swing.JPanel setMaterialsPanel;
    private javax.swing.JPanel setObjectivesPanel;
    private javax.swing.JPanel setRefPanel;
    private javax.swing.JPanel setReqListTypePanel;
    private javax.swing.JPanel setRequirementsPanel;
    private javax.swing.JPanel setTopicsPanel;
    private javax.swing.JLabel statusLabel;
    private javax.swing.JTextField termField;
    private javax.swing.JLabel termLabel;
    private javax.swing.JTextField timeField;
    private javax.swing.JLabel timeLabel;
    private javax.swing.JTextField titleField;
    private javax.swing.JLabel titleLabel;
    private javax.swing.JTable topicsList;
    private javax.swing.JPanel topicsPanel;
    private javax.swing.JTextField typeField;
    private javax.swing.JLabel typeLabel;
    private javax.swing.JTextField valueField;
    private javax.swing.JLabel valueLabel;
    private javax.swing.JTextField weekField;
    private javax.swing.JLabel weekLabel;
    // End of variables declaration//GEN-END:variables

}
